# History

See [useSendTransaction](/docs/API%20Reference/Hooks#usesendtransaction).

To access history of transactions, use ``useTransactions`` hook.

```tsx
  const { transactions } = useTransactions()
```

``transactions`` is an array so you can use ``transactions.map(...)`` to display all of
transactions.

For example:

```tsx
  {transactions.map((transaction) => (
          <ListElement
            transaction={transaction.transaction}
            title={transaction.transactionName}
            icon={TransactionIcon(transaction)}
            key={transaction.transaction.hash}
            date={transaction.submittedAt}
          />
        ))}
```

``ListElement`` is a react function that displays information about single transaction.

**Live example**

App will deposit 1 wei to Wrapped Ether contract and display transaction notification.
Connect a MetaMask wallet **and switch to a test network**, such as Kovan or Ropsten.

import { ExampleContainer } from '/src/examples/ExampleContainer';
import TransactionHistory from '../../../example-loader.js!/src/examples/TransactionHistory.tsx'

<ExampleContainer example={TransactionHistory}/>
